package realtime.util;

public class MySqlUtil {

    public static String getLookUpTableDDL(String tableName) {
        return "with (\n" +
                "    'connector' = 'jdbc',\n" +
                "    'url' = 'jdbc:mysql://139.196.215.11:3306/gmall',\n" +
                "    'table-name' = '" + tableName + "',\n" +
                "    'username' = 'root',\n" +
                "    'password' = 'Qq123123',\n" +
                "    'lookup.cache.max-rows' = '10',\n" +
                "    'lookup.cache.ttl' = '1 hour',\n" +
                "    'driver' = 'com.mysql.cj.jdbc.Driver'\n" +
                ")";
    }

    public static String getBaseDicLookUpTable() {
        return "create table base_dic(\n" +
                "    `dic_code` STRING,\n" +
                "    `dic_name` STRING,\n" +
                "    `parent_code` STRING,\n" +
                "    `create_time` STRING,\n" +
                "    `operate_time` STRING\n" +
                ") " + getLookUpTableDDL("base_dic");
    }

}
